package cn.javadog.smartbreeding.core.dto;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 余勇
 */
@Data
@ApiModel("分页")
public class PageDTO implements Serializable {

	@ApiModelProperty("页码，从1开始")
	private Integer currentPage;

	@ApiModelProperty("每页条数")
	private Integer pageSize;

	@ApiModelProperty("偏移量")
	private Integer offset;

	public int getOffset(){
		return (currentPage - 1) * pageSize;
	}
}
